// 视图组件
const view = {
  tabs: () => import('@/layouts/tabs'),
  blank: () => import('@/layouts/BlankView'),
  page: () => import('@/layouts/PageView')
}

// 路由组件注册
const routerMap = {
  'login': {
    path: '/login',
    name: '登录',
    component: () => import('@/pages/login')
  },
  'root': {
    path: '/',
    name: '主页',
    component: view.tabs,
    redirect: '/login'
  },
  'home': {
    path: '/home',
    name: '首页',
    component: () => import('@/pages/home')
  },

  '/dashboard': {
    path: '/dashboard',
    name: '预警分析',
    meta: {
      icon: 'dashboard'
    },
    component: view.blank,
  },
  '/dashboard/ecology': {
    path: 'ecology',
    name: '生态指数',
    meta: {},
    component: () => import('@/pages/dashboard/ecology/index'),
  },
  '/dashboard/ratio': {
    path: 'ratio',
    name: '考核占比',
    meta: {},
    component: () => import('@/pages/dashboard/ratio/index'),
  },
  '/dashboard/rectification': {
    path: 'rectification',
    name: '整改落实',
    component: () => import('@/pages/dashboard/rectification/index'),
    meta: {},
  },
  '/dashboard/warning': {
    path: 'warning',
    name: '考核排名',
    component: () => import('@/pages/dashboard/warning/index'),
    meta: {},
  },

  '/inspection': {
    path: 'inspection',
    name: '量化评估',
    meta: {
      icon: 'table'
    },
    component: view.blank,
  },
  '/inspection/base': {
    path: 'base',
    name: '考核基础',
    component: () => import('@/pages/inspection/base/index.vue'),
  },
  '/inspection/branch': {
    path: 'branch',
    name: '支部列表',
    component: () => import('@/pages/inspection/branch/index.vue'),
  },
  '/inspection/regulation': {
    path: 'regulation',
    name: '考核指标体系',
    component: () => import('@/pages/inspection/regulation/index.vue'),
  },
  '/inspection/event': {
    path: 'event',
    name: '数据采集',
    component: () => import('@/pages/inspection/event/index.vue'),
  },
  '/inspection/summary': {
    path: 'summary',
    name: '汇总测算',
    component: () => import('@/pages/inspection/summary/index.vue'),
  },
  '/inspection/violations': {
    path: 'violations',
    name: '预警发布',
    component: () => import('@/pages/inspection/violations/notice/index.vue'),
  },
  '/inspection/political': {
    path: 'political',
    name: '综合排名',
    component: () => import('@/pages/inspection/political/notice/index.vue'),
  },

  '/basic': {
    path: 'basic',
    name: '基础设置',
    meta: {
      icon: 'setting'
    },
    component: view.blank,
  },
  '/basic/dept': {
    path: 'dept',
    name: '部门管理',
    component: () => import('@/pages/basic/dept/index.vue'),
  },
  '/basic/user': {
    path: 'user',
    name: '人员管理',
    component: () => import('@/pages/basic/user/index.vue'),
  },
  '/basic/role': {
    path: 'role',
    name: '角色管理',
    component: () => import('@/pages/basic/role/index.vue'),
  },
  '/basic/dict': {
    path: 'dict',
    name: '字典管理',
    component: () => import('@/pages/basic/dict/index.vue'),
  },

  '/system': {
    path: 'system',
    name: '系统管理',
    meta: {
      icon: 'desktop'
    },
    component: view.blank,
  },
  '/system/config': {
    path: 'config',
    name: '参数管理',
    component: () => import('@/pages/system/config/index.vue'),
  },
  '/system/menu': {
    path: 'menu',
    name: '菜单管理',
    component: () => import('@/pages/system/menu/index.vue'),
  },
  '/system/cloudFile': {
    path: 'cloudFile',
    name: '云文件',
    component: () => import('@/pages/system/cloudFile/index'),
  },

  exception: {
    name: '异常页',
    icon: 'warning',
    component: view.blank
  },
  exp403: {
    authority: '*',
    name: 'exp403',
    path: '403',
    component: () => import('@/pages/exception/403')
  },
  exp404: {
    name: 'exp404',
    path: '404',
    component: () => import('@/pages/exception/404')
  },
  exp500: {
    name: 'exp500',
    path: '500',
    component: () => import('@/pages/exception/500')
  },
}
export default routerMap

